const axios = require('axios')
const fs = require('fs')
const path = require('path')

// 高德地图API配置
const AMAP_API_KEY = '1e78c715e27c66645da98320d893cd30' // 替换为您的实际API密钥
const AMAP_API_BASE_URL = 'https://restapi.amap.com/v3'

async function main() {
    // 获取小区详情（包含边界信息）
    const detailUrl = `${AMAP_API_BASE_URL}/assistant/inputtips`
    const detailParams = {
        key: AMAP_API_KEY,
        // location: '120.626893,30.161586',
        output: 'JSON',
        extensions: 'all',
        keywords: '兴海嘉苑幢',
        offset: 100,
        city:'绍兴市',
        citylimit: true,
        offset:100,
        page_size:30
        // extensions:'all'
    }

    const params = new URLSearchParams(detailParams)

    const detailResponse = await fetch(detailUrl + '?' + params.toString())
    const detailData = await detailResponse.json()
    debugger
    console.log('detailData', detailData)
}
main()
